/**
 * 
 */
package test;

import java.math.BigInteger;

/**
 * @author zhong
 *
 */
public class 阶乘 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BigInteger cur = new BigInteger("1");
		for (int i = 1; i < 100; i++) {
			cur = cur.multiply(new BigInteger("" + i));
			System.out.println(i + " " + counZero(cur));
		}

	}

	private static int counZero(BigInteger cur) {
		byte[] c = cur.toByteArray();
		int k = c.length - 1;
		while (k >= 0 && c[k] == 0) {

		}
		return 0;
	}

}
